
//
//  HardWareTableViewCell.m
//  DFront
//
//  Created by lanou on 15/10/28.
//  Copyright © 2015年 xuzenghui. All rights reserved.
//

#import "HardWareTableViewCell.h"

@implementation HardWareTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, kScreenWidth - 10, 40)];
        _titleLabel.font = [UIFont systemFontOfSize:15];
        _titleLabel.numberOfLines = 0;
        [self.contentView addSubview:_titleLabel];
        
        CGFloat lx = (kScreenWidth - 15) / 3;
        _aImage = [[UIImageView alloc] initWithFrame:CGRectMake(5, 50, lx, lx * 3 / 4)];
        _bImage = [[UIImageView alloc] initWithFrame:CGRectMake(7.5 + lx, 50, lx, lx * 3 / 4)];
        _cImage = [[UIImageView alloc] initWithFrame:CGRectMake(10 + lx * 2, 50, lx, lx * 3 / 4)];
        [_aImage setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"placeHolder"]]];
        [self.contentView addSubview:_aImage];
        [self.contentView addSubview:_bImage];
        [self.contentView addSubview:_cImage];
        
        CGFloat ly = 55 + lx * 3 / 4;
        _authorImg = [[UIImageView alloc] initWithFrame:CGRectMake(7, ly + 1, 22, 22)];
        _authorImg.layer.cornerRadius = 11;
        _authorImg.layer.masksToBounds = YES;
        [self.contentView addSubview:_authorImg];
        
        _authorNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(36, ly + 3, kScreenWidth / 2, 15)];
        _authorNameLabel.font = [UIFont systemFontOfSize:12];
        _authorNameLabel.textColor = [UIColor brownColor];
        [self.contentView addSubview:_authorNameLabel];
        
        _replyLabel = [[UILabel alloc] initWithFrame:CGRectMake(kScreenWidth - 115, ly + 3, 60, 15)];
        _replyLabel.font = [UIFont systemFontOfSize:10];
        [self.contentView addSubview:_replyLabel];
        
        _replyTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(kScreenWidth - 80, ly + 3, 80, 15)];
        _replyTimeLabel.font = [UIFont systemFontOfSize:10];
        [self.contentView addSubview:_replyTimeLabel];
        
//        _lineLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, ly + 30, kScreenWidth, 2)];
//        _lineLabel.backgroundColor = [UIColor lightGrayColor];
//        [self.contentView addSubview:_lineLabel];
        
        
        
    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
